package demo07;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("demo07");
        System.out.println("spring初始化容器完毕------");

        System.out.println("通过容器获取Person对象------");
        Person person = context.getBean(Person.class);
        System.out.println("调用Person对象和相关的方法，进行使用------4");
        person.play();

        context.close();
        System.out.println("spring容器关闭完毕------");


    }
}
